package gui.win.indels;

import gui.Segl1;
import gui.utils.Borders;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextArea;

/*Author: John Archer, Contact: john.archer.jpa@gmail.com*/
public class Indels extends JFrame{
    private JTextArea lab;

    public Indels(Segl1 SegL1){
        super();
        this.setLocation(SegL1.getLocationOnScreen().x + 50, SegL1.getLocationOnScreen().y + 50);
        this.setLayout(new FlowLayout());
        this.setSize(new Dimension(400, 184));
        JPanel p = new JPanel();
        p.setBorder(Borders.getTitledBorder(Borders.STANDARD_TITLED_BORDER, "INDELS"));
        p.setLayout(new BorderLayout());
        JPanel p1 = new JPanel(new BorderLayout());
        p1.setBorder(BorderFactory.createEmptyBorder(0, 6, 0, 6));
        lab = new JTextArea();
        lab.setFont(Borders.getFont(Borders.GUIFONT));
        lab.setText("Insertions of the specified length will be saved relative to\n" +
                "their start locations on the template. E.g. if there is an insertion\n" +
                "of length 4 within a read starting at postion x on the template the\n" +
                "count for postion x will be incremented by 1. The count at other sites\n" +
                "will not be incremented.");
        p1.add(lab, BorderLayout.CENTER);
        p.add(p1, BorderLayout.NORTH);
        this.add(new Buttons(SegL1, this), BorderLayout.SOUTH);
        this.setVisible(true);
        this.setAlwaysOnTop(true);
    }
    public void closeFrame(){this.dispose();}
}
